home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Languguage OS 2
/
Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO
/
language
/
embedded
/
develop
/
libsrc11.arc
/
RDBLKSC9.C
< prev
next >
Wrap
Text File
|
1989-06-27
|
1KB
|
38 lines
/* rdblksc9.c 4.2 */
/*F****************************************************************************
FUNCTION NAME: rdblksc9
ACTION: Read count characters from the SCI serial hardware
into an array of integer.
PARAMETERS:
array: address of an array of integers to be written to.
count: number of integers to read from port C.
RETURNS: (void)
******************************************************************************/
#include <hc11/directives.h>
SMALL
void rdblksc9(array, count)
int *array; /* pointer to data to be read */
int count; /* number of bytes to be read */
{
/****************************************************************/
/* Note that "while ((count--) > 0)" is equivalent to */
/* "while ((--count) >= 0)" but the pre-decrement version */
/* is more efficient than the post-decrement version. */
/****************************************************************/
while ((--count) >= 0)
*(array++) = rdbytsc();
} /* end of rdblksc9 */